Skip to content

DM-7665: fixed the region parsing issue regarding region used separators contained in some property values #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 23, 2016

Conversation

cwang2016
Copy link
Contributor

Fixed the parsing errors which happen when

  • semicolon, space, or '#' is contained in the values of text property.
  • the text (or font) property is not properly quoted with " or ' or {}.

Test sample,
upload firefly_test_data/region-test-files/regionText.reg
or
visit localhost:8080/demo/ffapi-highlevel-test.html by clicking 'test-open' and 'create_region_layer'

Cindy Wang added 2 commits September 22, 2016 18:19
…ors in the values of some properties which have string type values.

delete a space line

handle ';' and ' ' in region description and region property at server side.

fixed some computational bug for parsing text and font string in region property.
Copy link
Contributor

@robyww robyww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beyond break up the one function it looks good.


// collect region lines and each line may contain coordinate, region description or both
var regionLines = regionData.reduce( (rLines, oneLine) => {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lot of code for a reduce function. I think you should break it up so that it is a little easier to follow. I see that the old approach was a reduce as well but it was not as big.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment.

@cwang2016
Copy link
Contributor Author

Breaking up the code as the comment.

@cwang2016 cwang2016 merged commit 93cf9b1 into dev Sep 23, 2016
@cwang2016 cwang2016 deleted the DM-7655-RegionPropText branch September 23, 2016 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants